﻿Imports DTO
Imports DAO


Public Class CSachBUS
    Public Function LayTenSach(ByVal masach As Integer) As String
        Return New CSachDAO().LayTenSach(masach)
    End Function

    Public Function LayTienPhatKhiBietMaSach(ByVal masach As Integer) As Integer
        Return New CSachDAO().LayTienPhatKhiBietMa(masach)
    End Function

    Public Function LayThongTinSach(ByVal _ma As Integer) As CSachDTO
        Return New CSachDAO().LayThongTinSach(_ma)
    End Function
    Public Function LaySoLuongSachDaMuon(ByVal ma As Integer) As Integer
        Return New CSachDAO().LaySoLuongSachDaMuon(ma)
    End Function

    Public Function LayDanhSachSach() As List(Of CSachDTO)
        Return New CSachDAO().LayDanhSachSach()
    End Function

    Public Function CapNhatSach(ByVal sach As CSachDTO) As Boolean
        Return New CSachDAO().CapNhatSach(sach) > 0
    End Function

    Public Function TraCuu(ByVal masach As Integer) As CSachDTO
        Return New CSachDAO().TraCuu(masach)
    End Function

    Public Function TraCuuKhongCoMaSach(ByVal sachcrt As CSachCrt) As List(Of CSachDTO)
        Return New CSachDAO().TraCuuKhongCoMaSach(sachcrt)
    End Function
End Class
